//约定通用键名
const INFO_KEY='user_info'
export const getInfo =() => { 
    const defaultObj = {token:'',userId:''}
    const result =localStorage.getItem(INFO_KEY)
    return result?JSON.parse(result):defaultObj
}
export const setInfo =(obj) => { 
    localStorage.setItem(INFO_KEY,JSON.stringify(obj))
}
export const removeInfo =() => { 
    localStorage.removeItem(INFO_KEY)
}